package CodeBlock;

public class Demo {
    public static void main(String[] args) {
        System.out.println(Cat.n1);
    }
}

class Animal {
    static {
        System.out.println("Animal静态代码块被执行");
    }
}

class Cat extends Animal {
    public static int n1 = 111;

    // 静态代码块
    static {
        System.out.println("Cat静态代码块被执行");
    }
}